home *** CD-ROM | disk | FTP | other *** search
/ Delphi 2.0 - Programmer's Utilities Power Pack / Delphi 2.0 Programmer's Utilities Power Pack.iso / a_to_d / dsleep / readme.txt next >
Encoding:
Text File  |  1996-09-15  |  1.2 KB  |  31 lines

  1. TSleeper is a simple little component that you can use to easily implement
  2. delays in Delphi. It encapsulates a TTimer component and handles the
  3. necessary details to allow you to delay your application in a "Windows-
  4. friendly" manner.
  5.  
  6. To use TSleeper, drop one on a form. You can set the Interval property at
  7. design time, if you wish, or at run time. As with TTimer, the interval is
  8. given in units of milliseconds. To go to sleep, call
  9.  
  10.  Sleeper1.Sleep;
  11.  
  12. (assuming that your TSleeper component is named Sleeper1). You can also use
  13. the SleepFor method, which combines setting the Interval and going to sleep
  14. in a single method call. For example,
  15.  
  16.  Sleeper1.SleepFor(2000);
  17.  
  18. will cause your application to go to sleep for two seconds, and also set the
  19. Interval to 2000.
  20.  
  21. Note that TSleeper uses a Windows timer, and timer messages are low-priority.
  22. Therefore, you should consider the Interval to be the minimum time that your
  23. application will go to sleep.
  24.  
  25. By default, TSleeper is installed on the "Pandion" page of your component
  26. palette. You can move it to any other page using the Palette page of the
  27. Options|Preferences dialog.
  28.  
  29. Steve Schafer
  30. 76711,522
  31.